<?php
namespace App\Http\Controllers;

use App\Models\User;
use Request, Config, Session;
class PublicController extends Controller {
    public function __construct(){
        $this->middleware('adminAuth', ['except' => ['anyLogin']]);
        $this->middleware('adminMenu', ['except' => ['anyLogin', 'anyLogout']]);
        $this->init();
        $this->_initialize();
    }
    public function _initialize(){}
    public function init(){
        if(!empty(Config::get('app.oss_config.OSS_OPEN'))){
            Config::set('website.storage_url', Config::get('app.oss_config.storage_url'));
            Config::set('website.img_url', Config::get('app.oss_config.img_url'));
        }else{
            Config::set('website.storage_url', Config::get('app.url'));
            Config::set('website.img_url', Config::get('app.url'));
        }
    }

}
